package cn.yuanqiao.archive.archiveBorrowCar.mapper;

import cn.yuanqiao.archive.archiveBorrowCar.domain.YqdaborrowCar;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * archiveBorrowCarMapper接口
 * 
 * @author yuanqiao
 * @date 2023-07-14
 */
public interface YqdaborrowCarMapper
{
    /**
     * 查询archiveBorrowCar
     *
     * @param carId archiveBorrowCar主键
     * @return archiveBorrowCar
     */
    public YqdaborrowCar selectYqdaborrowCarByCarId(String carId);

    /**
     * 查询archiveBorrowCar列表
     *
     * @param yqdaborrowCar archiveBorrowCar
     * @return archiveBorrowCar集合
     */
    public List<YqdaborrowCar> selectYqdaborrowCarList(YqdaborrowCar yqdaborrowCar);

    /**
     * 新增archiveBorrowCar
     *
     * @param yqdaborrowCar archiveBorrowCar
     * @return 结果
     */
    public int insertYqdaborrowCar(YqdaborrowCar yqdaborrowCar);

    /**
     * 修改archiveBorrowCar
     *
     * @param yqdaborrowCar archiveBorrowCar
     * @return 结果
     */
    public int updateYqdaborrowCar(YqdaborrowCar yqdaborrowCar);

    /**
     * 删除archiveBorrowCar
     *
     * @param carId archiveBorrowCar主键
     * @return 结果
     */
    public int deleteYqdaborrowCarByCarId(String carId);

    /**
     * 批量删除archiveBorrowCar
     *
     * @param carIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYqdaborrowCarByCarIds(@Param("carIds")String[] carIds,@Param("userId")Long userId,@Param("tenantCode")String tenantCode);

    public int deleteYqdaborrowCarByArchiveIds(@Param("archiveIds")String[] archiveIds,@Param("userId")Long userId,@Param("tenantCode")String tenantCode);


    List<Map<String, Object>> selectArchiveByArchiveIdAndCategoryId(@Param("sql")  String sql);

    List<Map<String, Object>> selectCommonFiledByTenantCode(String tenantCode);

    int batchInsertYqdaborrowCar(@Param("yqdaborrowCars")List<YqdaborrowCar> yqdaborrowCars);

    int checkArchiveIsAddCar(List<YqdaborrowCar> yqdaborrowCars);

    List<YqdaborrowCar> selectYqdaborrowCarListByIds(YqdaborrowCar yqdaborrowCar);

    List<Map<String, Object>> selectYqdaArchiveList(String toString);
}

